package xkp.lesson3;

import java.io.*;

public class Sasasa {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
      /*  ByteArrayInputStream bis = new ByteArrayInputStream("abcdef".getBytes());
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        int ch = 0;
        while ((ch = bis.read()) != -1) {
            bos.write(ch);
            System.out.print(ch);

        }
        System.out.println();
        System.out.println(bos.toString());*/


        // 序列化
//        ByteArrayOutputStream bos = new ByteArrayOutputStream();
//        ObjectOutputStream oos = new ObjectOutputStream(bos);
//
//        oos.writeObject(this);
//
//        // 反序列化
//        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
//        ObjectInputStream ois = new ObjectInputStream(bis);
//
//        return ois.readObject();

    }
}
